package database;

import java.sql.*;
public class Connecter {
	static String driverName = "sun.jdbc.odbc.JdbcOdbcDriver";
	static String connectionString = "jdbc:odbc:huitong";
	private Connection connection ;
	static
	{
		try{
			Class.forName(driverName);
		}
		catch (ClassNotFoundException e)
		{
			e.printStackTrace();
		}
	}	
	public Connection getConnenction()
	{
		try
		{
			connection = DriverManager.getConnection(connectionString,"cart","123456");
		}
		catch (SQLException e)
		{
			e.printStackTrace();
		}
		return connection;
	}

}
